/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.wmapp.utils;

import javax.mail.*;
/**
 *
 * @author Administrator
 */
public class SmtpAuthenticator extends Authenticator {
  String username = null;
  String password = null;
  public SmtpAuthenticator() {
  }

  public PasswordAuthentication performCheck(String user, String pass) {
    username = user;
    password = pass;
    return getPasswordAuthentication();
  }

@Override
  protected PasswordAuthentication getPasswordAuthentication() {
    return new PasswordAuthentication(username, password);
  }
}
